package com.hkts.naturalgas.performance.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;

import com.baomidou.mybatisplus.extension.service.IService;

import com.hkts.naturalgas.index.entity.ParamVo;
import com.hkts.naturalgas.performance.entity.HkAssessmentScore;
import com.hkts.naturalgas.performance.performanceTo.PerformanceTo;
import com.hkts.naturalgas.performance.performanceTo.SubmitPerformanceDTo;
import com.hkts.naturalgas.performance.performanceVo.*;
import com.hkts.naturalgas.utils.CustomPage;
import com.hkts.naturalgas.utils.Result;

import java.text.ParseException;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author yck
 * @since 2020-12-16
 */
public interface IHkAssessmentScoreService extends IService<HkAssessmentScore> {

    /**
     * 分页查询
     *
     * @param bootStrapTable
     * @param hkAssessmentScore
     * @return
     */
    IPage<HkAssessmentScore> selectPage(Page<HkAssessmentScore> page, HkAssessmentScore hkAssessmentScore);

    List<HkAssessmentScore> selectList(HkAssessmentScore hkAssessmentScore);

    void saveScoreAndForm(PerformanceTo  performanceTo) throws Exception;
    void saveScoreAndFormTo(SubmitPerformanceDTo submitPerformanceDTo) throws Exception;

    void updateStateByProcessInstanceId(HkAssessmentScore score);

    List<HkAssessmentScore> getHkAssessmentScoreByProIds(List<String> ids);

    Result<LinkedHashMap<String, List<PerformanceInfoNameAndUserNickVo>>> getHkAssessmentInfoAndUserNickNameByProIds();

    List<PerformanceScoreListVo> getHkAssessmentScoreByProId(String proessId);

    //直接审核通过
    Map<String, Object> approvalWithoutScore( String processInstanceId, String taskId) throws Exception;

    Map<String, Object> approvalWithScore(String list, String processInstanceId, String taskId) throws Exception;

    List<HistoryCommentAndScoreVo> getHistoryCommentAndScore(String processInstanceId, String indexId);
    Map<String,Object> selectScoreByHontUserOnDepartementPositive();

    CustomPage selectHistoryByHontUser(CustomPage page) throws ParseException;
    /*List<Map<String,Object>> selectHistoryByHontUserAndTime(AssessmentHontUserQueryVo assessmentHontUserQueryVo) throws ParseException;*/

    Map<String,Object> selectHistoryByProcessId(String processId);

    Map<String, Object> approvalWithScoreVf(SubmitPerformanceDTo submitPerformanceDTo) throws Exception;

    Page getPersonPerformanceByDate(CustomPage page,ParamVo paramVo);

    Map<String,Object> getPersonPerformanceCountScoreByDate(ParamVo paramVo);

    Map<String,Object> getHistoryNumPerformanceByDate(ParamVo paramVo);
}